package com.os.ch2.prepost;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @Author Matt
 * @Date 2022-01-10
 * @Desc:
 * @Version V1.0
 */
public class JSR250WayService {

    @PostConstruct  //在构造函数执行完成之后执行
    public void init(){
        System.out.println("jsr250-init-method");
    }

    public JSR250WayService(){
        super();
        System.out.println("初始化构造函数-JSR250WayService");
    }

    @PreDestroy  //在bean销毁之前执行
    public void destory(){
        System.out.println("jsr250-destory-method");
    }
}
